<!--#include file="inc/AspCms_SettingClass.asp" -->
<%
CheckLogin()
dim action : action=getForm("action","get")
if action="editPass" then editPass
Sub editPass
	dim LoginName,PassWord,rePassword
	LoginName=getForm("LoginName","post")	
	PassWord=getForm("PassWord","post")	
	rePassword=getForm("rePassword","post")		

	if isnul(PassWord) then alertMsgAndGo "密码不能为空","-1"
	if rePassword<>Password then alertMsgAndGo "两次输入密码不相同","-1" 
	'if isnul(RealName) then alertMsgAndGo "管理员姓名不能为空","-1"	
	conn.Exec "update {prefix}User set [Password]='"&md5(PassWord,16)&"' where LoginName='"&LoginName&"'","exe"	
	alertMsgAndGo "修改成功","editPass.asp"
End Sub
%>

<!DOCTYPE html>
<html lang="zh-CN" style="min-height: 100%;">
<head>
<title>EditPassWord</title>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no">
<meta name="renderer" content="webkit">
<meta http-equiv="X-UA-Compatible" content="IE=edge,Chrome=1" />

<link href="css/timoo/uikit.min.css" rel="stylesheet">
<link href="css/timoo/perfect-scrollbar.min.css" rel="stylesheet">
<link href="css/timoo/timoo.css" rel="stylesheet">

<script src="js/timoo/jquery.min.js"></script>
<script src="js/timoo/uikit.min.js"></script>
<script src="js/timoo/uikit-icons.min.js"></script>
<script src="js/timoo/timoo.js"></script>
</head>
<body>
<div class="tm-right">
    <div class="main">
        <div class="section setting-company">
            <div class="layout">
                <div class="title">修改密码</div>
                <div class="content">
                    <form name="form" action="?action=editPass" method="post">
                        <div class="tm-transition list">
                            <div class="uk-clearfix tm-transition subject">
                                <span class="uk-float-left">登录名</span>
                            </div>
                            <div class="input">
                                <input type="text" value="<%=session("adminName")%>" name="LoginName" readonly>
                            </div>
                        </div>
                        <div class="tm-transition list">
                            <div class="uk-clearfix tm-transition subject">
                                <span class="uk-float-left">新密码</span>
                            </div>
                            <div class="input">
                                <input type="password" maxLength="200" name="Password">
                            </div>
                        </div>
                        <div class="tm-transition list">
                            <div class="uk-clearfix tm-transition subject">
                                <span class="uk-float-left">确认密码</span>
                            </div>
                            <div class="input">
                                <input type="password" maxlength="200" name="rePassword">
                            </div>
                        </div>
                        <div class="uk-clearfix tm-transition list submit">
                            <div class="uk-float-left input">
                                <input type="submit" value="修改">
                            </div>
                            <div class="uk-float-left input">
                                <input type="button" value="返回" onClick="history.go(-1)"> 
                            </div>
                        </div>
                    </form>
                </div>
            </div>
        </div>
    </div>
</div>
</body>
</html>